#include <iostream>
#include "Sock.hpp"

static void Usage(const std::string &process)
{
    std::cout << "\nUsage: " << process << " ip port\n"
              << std::endl;
}

int main(int argc, char* argv[])
{
    if (argc != 3)
    {
        Usage(argv[0]);
        exit(1);
    }
    std::string server_ip = argv[1];
    uint16_t server_port = atoi(argv[2]);
    Sock sock;
    int sockfd = sock.Socket(); // 创建套接字
    if (!sock.Connect(sockfd, server_ip, server_port)) // 连接
    {
        std::cerr << "Connect error" << std::endl; 
    }

    // 通信
    while (true)
    {
        
    }

    return 0;
}